package internact;
import javax.swing.*;
@SuppressWarnings({"all"})

/**
 * 主程序
 */
public class MainFrame extends JFrame {
    private UserPanel userPanel;
    private AdminPanel adminPanel;
    private MemberPanel memberPanel;
    private UserManager userManager;
    private AdminManager adminManager;
    private MemberManager memberManager;

    public MainFrame() {
        setTitle("网吧管理系统");
        setSize(600, 400);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        userManager = new UserManager();
        adminManager = new AdminManager();
        memberManager = new MemberManager();

        userPanel = new UserPanel(userManager);
        adminPanel = new AdminPanel(adminManager, memberManager);
        memberPanel = new MemberPanel(memberManager);

        JTabbedPane tabbedPane = new JTabbedPane();
        tabbedPane.addTab("用户", userPanel);
        tabbedPane.addTab("管理员", adminPanel);
        tabbedPane.addTab("会员", memberPanel);

        add(tabbedPane);

        setVisible(true);
    }

    public static void main(String[] args) {
        new MainFrame();
    }
}
